import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

import Home from '../views/Home.vue'
import about from '../views/about.vue'

const router = new VueRouter({
    routes: [
        { 
            path: '/home', 
            component: Home
        },
        {
            path: "/about",
            component: about
        },
        // 重定向
        {
            path: '/', 
            redirect: '/home' 
        }
    ]
})

export default router